Skip to content

Make truncspace explanation more specific#284

Merged
Jutho merged 2 commits intoQuantumKitHub:mainfrom
leburgel:lb/truncpace_docstring
Sep 18, 2025
Merged

Make truncspace explanation more specific#284
Jutho merged 2 commits intoQuantumKitHub:mainfrom
leburgel:lb/truncpace_docstring

Conversation

@leburgel
Copy link
Copy Markdown
Member

I managed to confuse myself about the intended behavior of the truncspace truncation scheme since dimensions were coming out smaller than I expected, and the explanation in the tsvd docstring didn't really help. It turned out that the truncation did behave as I would expect, but then the docstring is technically incorrect and a bit confusing.

So, I thought it would be better to make this a bit more specific.

Comment thread docs/src/man/tensors.md Outdated

* `truncspace(W)`: truncates such that the dimension of the internal vector space is
smaller than that of `W` in any sector, i.e. with
smaller than or equal to that of `W` in any sector, i.e. with
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
smaller than or equal to that of `W` in any sector, i.e. with
no bigger than that of `W` in any sector, i.e. with

also possible

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I would go for 'no larger than', but other than that it's the same to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

Copy link
Copy Markdown
Member

@Jutho Jutho Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or 'not greater than', or 'not higher than'. I now also start to wonder about the formality of 'no' versus 'not.

It seems Julia docs describes <= and >= "Less-than-or-equals" and "greater-than-or-equals".

I also find online that 'larger' sometimes refers to the absolute value, but since dimensions are positive that is still valid. The mysteries of the English language ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with 'no greater than'. I think 'greater' is the most appropriate one in the end, but I do think 'no' fits better than 'not' in this kind of phrase.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/tensors/factorizations.jl 90.26% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leburgel leburgel force-pushed the lb/truncpace_docstring branch from fda00f8 to a957b65 Compare September 18, 2025 08:24
@leburgel leburgel requested a review from Jutho September 18, 2025 08:26
@Jutho
Copy link
Copy Markdown
Member

Jutho commented Sep 18, 2025

I don't think we need CI to finish for this.

@Jutho Jutho merged commit cf494b9 into QuantumKitHub:main Sep 18, 2025
12 checks passed
@leburgel leburgel deleted the lb/truncpace_docstring branch September 18, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants